<template>
        <div>
        <!--<web :srcdoc="htmlData" :style="webStyle"></web>-->
        <web v-if="isWeb" :srcdoc="htmlData" :style="webStyle"></web>
        <web v-if="isIos" :source="htmlData" :style="webStyle"></web>
        <gsyWeb v-if="isAndroid" :srcdoc="htmlData" :style="webStyle" ></gsyWeb>
        </div>
</template>

<style scoped>
</style>

<script>
    import  {launchUrl} from "../../core/common/htmlUtils"
    export default {
        components:{
        },
        data: () => {
            return {}
        },
        props: {
            source: {type: String},
            webStyle: {type: Object, default: {height:'1334px', width: '750px'}},
        },
        computed: {
            htmlData() {
                return this.source;
            },
            isWeb() {
                return WXEnvironment.platform === 'Web';
            },
            isIos() {
                return WXEnvironment.platform.toLowerCase() === 'ios';
            },
            isAndroid() {
                return WXEnvironment.platform.toLowerCase() === 'android';
            }
        },
        methods: {
            // onOverrideUrl(event) {
            //   this.gsygithubLink && this.gsygithubLink(event.url);
            // }
        },
        created() {
        },
    }
</script>
